home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Presen…rary 6 (Reseller Edition)
/
Apple Ref. & Pres. Lib.v6.0.toast
/
pc
/
3-Presentations
/
Apple Demos
/
Training
/
HyperCard 2.0 Training
/
Intro to HyperCard 2.0
/
card_46338.txt
< prev
next >
Wrap
Text File
|
1990-08-24
|
2KB
|
69 lines
-- card: 46338 from stack: in.0
-- bmap block id: 0
-- flags: 0000
-- background id: 45680
-- name: CONTROLLING MENUS
----- HyperTalk script -----
on closeCard
set the scroll of cd fld "commandsList" to 0
end closeCard
-- part 1 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=61 top=135 right=305 bottom=411
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: commandsList
-- part contents for background part 1
----- text -----
Here are examples of the HyperTalk commands for controlling menus:
-- part contents for card part 1
----- text -----
append menuItem "By grade..." to menu "Sort"
delete menuItem "Expert" from menu "Level"
delete last menuItem of menu 3
delete menu "Tools"
delete menuItem 5 of menu "File"
put the number of menus
put the number of menuItems of menu "Preferences"
set the textStyle of menuItem 2 of menu 3 to italic
set the name of menuItem "Yesterday" of menu "Assign deadline" to ¬
"Next week"
set the cmdChar of menuItem "A4" of menu "Size" to "4"
set the markChar of menuItem "Next" of menu "go" to "•"
set the checkMark of menuItem 4 of menu 8 to true
set the menuMessage of menuItem "Addresses" of menu "My Stacks" ¬
to "go stack Addresses"
set the enabled of menuItem "Multiple Choice" of menu "Test Type" to¬
false
disable menu "Tools"
enable menuItem 6 of menu "File"
reset menubar -- return to the standard HyperCard 2.0 menus
-- part contents for background part 2
----- text -----
CONTROLLING MENUS WITH HYPERTALK